package com.xyy.saas.payment.job.openAccount;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.xyy.elasticjob.client.annotation.ElasticJobConf;
import com.xyy.saas.payment.service.job.QueryOpenAccountJobService;
import com.xyy.saas.payment.util.JSONUtils;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;

//@ElasticJobConf(name = "xyy.elastic.job.manage.QueryOpenPayStatusJob", cron = "0 0/1 * * * ?")
@Slf4j
public class QueryOpenPayStatusJob implements SimpleJob {
    @Resource
    private QueryOpenAccountJobService queryOpenAccountJobService;

    @Override
    public void execute(ShardingContext shardingContext) {
        log.info("QueryOpenPayStatusJob#execute start queryOpenAccountJobService.queryOpenPayStatus(), shardingContext:{}", JSONUtils.toJSON(shardingContext));
        queryOpenAccountJobService.queryOpenPayStatus();
        log.info("QueryOpenPayStatusJob#execute end queryOpenAccountJobService.queryOpenPayStatus()");
    }
}
